<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表格知识点</title>
</head>
<body>
<h1>html表格</h1>

<!--
1. 使用table标签 来定义表格
2. tr表示一行数据
3. td表示具体的一格数据

-->
<table border="1">
    <tr>
        <td>
            row 1,col 1
        </td>
        <td>
            row 1,col 2

        </td>
    </tr>
    <tr>
        <td>
            row 2,col 1
        </td>
        <td>
            row 2,col 2
        </td>
    </tr>
</table>

<!--
1.表格有边框属性
2. border代表边框大小 cellpadding代表表格的间距

-->

<table cellpadding="10">
    <tr>
        <td>
            row 1,col 1
        </td>
        <td>
            row 1,col 2

        </td>
    </tr>
    <tr>
        <td>
            row 2,col 1
        </td>
        <td>
            row 2,col 2
        </td>
    </tr>
</table>



<table border="1">


    <tfoot>
    <tr><th>row end col1</th><th>row end col2</th></tr>
    </tfoot>
    <tbody>
    <tr>
        <td>
            row 1,col 1
        </td>
        <td>
            row 1,col 2

        </td>
    </tr>
    <tr>
        <td>
            row 2,col 1
        </td>
        <td>
            row 2,col 2
        </td>
    </tr>
    </tbody>

    <thead>
    <tr><td>位置</td><td>位置</td></tr>
    </thead>

</table>



<table cellpadding="10" border="1">
    <tr>
        <td colspan="2">
            row 1,col 1
        </td>

        <td>
            row 1,col 2

        </td>
    </tr>
    <tr>
        <td>
            row 2,col 1
        </td>
        <td>
            row 2,col 2
        </td>
        <td rowspan="2">
            row 1,col 2

        </td>
    </tr>

    <tr>
        <td>
            row 2,col 1
        </td>
        <td>
            row 2,col 2
        </td>

    </tr>
</table>


</body>
</html>